﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StaffAdd.aspx.cs" Inherits="SJZD_AddType" %>
<html>
<head id="Head1" runat="server">
    <title>添加商品品牌</title>
<link href="../css/adminCss.css" rel="stylesheet" type="text/css" />
 <script type="text/javascript" src="../js/rl.js"></script>
<script type="text/javascript" src="../js/submit.js"></script>
<script type="text/javascript">
function check()
{
    if(document.getElementById("StaffWork").selectedIndex==0)
    {
        document.getElementById("lblMsg").innerText="请选择所属职务";
        document.getElementById("StaffWork").focus();
        return false;
    }

}
function account()
{
    var tc=document.getElementById("StaffPercentage").value;
    var jj=document.getElementById("StaffPrice").value;
     var dx=document.getElementById("StaffSalary").value;
      var gs=document.getElementById("WorkDay").value;
        var yj=document.getElementById("StaffPerformance").value;
         var kc=document.getElementById("txtkc").value;
        
      
 if(gs==""||gs=="0")
  {
     
  
         document.getElementById("YWage").value=Number(dx)+Number(jj)+(tc*yj/100);
         document.getElementById("SWage").value=Number(dx)+Number(jj)+(tc*yj/100)-Number(kc);
  
      
   
  }
  else
  {
      
        document.getElementById("YWage").value=Number(dx*gs/30)+Number(jj)+(tc*yj/100);
       document.getElementById("SWage").value=Number(dx)+Number(jj)+(tc*yj/100)-Number(kc);
  }
  
}

</script>
</head>
<body >
    <form id="form1" runat="server" onsubmit=" checknull(this)" >
           <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="31" height="22">
                    <img src="../images/module.gif" width="20" height="22"></img></td>
                <td style="width: 335px">
                    <asp:Label ID="lblwz" runat="server"></asp:Label></td>
                <td align="right" style="width: 990px">
                    <font color="red"> [ <a href="javascript:location.href=document.referrer;" ><font color="red">返回</font></a> ]</font>
                </td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td bgcolor="#3CB6E5" height="5px">
                </td>
            </tr>
        </table>
        <table width="99%" border="0" cellpadding="1" cellspacing="1" class="tabGg">
           
            
            <tr>
                <th width="15%" bgcolor="#FFFFFF" class="r_bg">
                    员工姓名：</th>
                <td width="34%" bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="StaffName" runat="server" CssClass="input1" check_null="员工姓名不能为空"></asp:TextBox></td>
                <th width="14%" bgcolor="#FFFFFF" class="r_bg">
                    所属部门：</th>
                <td width="37%" bgcolor="#FFFFFF" class="right_bg">
                    <asp:DropDownList ID="ddrDepartment" runat="server" Width="125px" CssClass="input1"  >
                        </asp:DropDownList></td>
            </tr>
            <tr>
                <th height="22" bgcolor="#FFFFFF" class="r_bg">
                    联系电话：</th>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="StaffTel" runat="server" CssClass="input1"  check_money="电话格式错误，请输入数字"></asp:TextBox></td>
                <th width="14%" bgcolor="#FFFFFF" class="r_bg">
                    所任职务：</th>
                <td width="37%" bgcolor="#FFFFFF" class="right_bg">
                    <asp:DropDownList ID="ddltype" runat="server" Width="125px" CssClass="input1"  >
                        </asp:DropDownList></td>
            </tr>
            <tr>
                <th bgcolor="#FFFFFF" class="r_bg">
                    联系地址：</th>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="StaffAddres" runat="server" CssClass="input1"></asp:TextBox></td>
                 <th bgcolor="#FFFFFF" class="r_bg">
                     销售类型：</th>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="StaffPercentage" runat="server" CssClass="input1" onBlur="if(this.value=='')this.value=0"   onFocus="if(this.value==0)this.value=''" check_money="提成必须为数字" onkeyup="account()" >0</asp:TextBox>
                    <asp:DropDownList ID="ddlsaletype" runat="server">
                        <asp:ListItem Value="0">－选择销售类型－</asp:ListItem>
                        <asp:ListItem Value="1">零售</asp:ListItem>
                        <asp:ListItem Value="2">批发销售</asp:ListItem>
                        <asp:ListItem Value="3">工程销售</asp:ListItem>
                    </asp:DropDownList><span
                        style="color: #ff0000"></span></td>
            </tr>
            <tr>
                <th bgcolor="#FFFFFF" class="r_bg">
                    员工底薪：</th>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="StaffSalary" runat="server" CssClass="input1" onBlur="if(this.value=='')this.value=0" Text="0"   onFocus="if(this.value==0)this.value=''"  check_money="底薪格式错误，请输入数字" check_null="员工底薪不能为空" onkeyup="account()"></asp:TextBox>
                    <font color="red">元</font></td>
                <th bgcolor="#FFFFFF" class="r_bg">
                    员工奖金：</th>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="StaffPrice" runat="server" CssClass="input1" onBlur="if(this.value=='')this.value=0"   onFocus="if(this.value==0)this.value=''" check_money="奖金格式错误，请输入数字" onkeyup="account()" >0</asp:TextBox><span
                        style="color: #ff0000">元</span></td>
            </tr>
            
            
            <tr>
                <th bgcolor="#FFFFFF" class="r_bg">
                    入职时间：</th>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="WageDate" runat="server" CssClass="input1" check_date="日期格式不对" ></asp:TextBox></td>
                <th bgcolor="#FFFFFF" class="r_bg">
                    员工排序：</th>
                <td bgcolor="#FFFFFF" class="right_bg">
                    <asp:TextBox ID="StaffOrder" runat="server" CssClass="input1" Text="0"></asp:TextBox></td>
            </tr>
            
            <tr>
                <th bgcolor="#FFFFFF" class="r_bg">
                    备注：</th>
                <td colspan="3" bgcolor="#FFFFFF" class="right_bg"><asp:TextBox ID="StaffDiscripte" runat="server" CssClass="input1" TextMode="MultiLine"  BorderWidth="1px" Height="80px" Width="231px"></asp:TextBox>
                    </td>
            </tr>
            
            <tr >
                <th bgcolor="#FFFFFF" class="r_bg" style="height: 33px">
                    是否在职：</th>
                <td align="left" bgcolor="#FFFFFF" class="right_bg" colspan="3" ><asp:RadioButton ID="rbtnFlag" runat="server" ForeColor="Red" Text="在职" GroupName="fg"  Checked="true"/><asp:RadioButton ID="rbtnnotFlag" runat="server" ForeColor="Red" Text="已离职" GroupName="fg" /></td>
            </tr>
            <tr>
                <th bgcolor="#FFFFFF" class="r_bg" style="height: 16px">
                    操作人员：</th>
                <td bgcolor="#FFFFFF" class="right_bg" style="height: 16px">
                    <asp:Label ID="lblUser" runat="server"></asp:Label></td>
                <td bgcolor="#FFFFFF" class="r_bg" style="height: 16px">
                    操作时间：</td>
                <td bgcolor="#FFFFFF" class="right_bg" style="height: 16px">
                    <asp:Label ID="lblTime" runat="server"></asp:Label>&nbsp;</td>
            </tr>
            <tr>
                <th bgcolor="#FFFFFF" class="r_bg">
                </th>
                <td colspan="3" bgcolor="#FFFFFF" class="right_bg">
                    <asp:Button ID="btnSave" CssClass="submit" runat="server" Text=" 提交 " OnClientClick="return checknull(this.form)"   OnClick="btnSave_Click"   />
                </td>
            </tr>
            <tr>
            <td colspan="4" style="text-align: center">
                <asp:Label ID="lblMsg" runat="server" Text="Label" ForeColor="Red"></asp:Label>
            </td>
            </tr>
        </table>
      <asp:HiddenField ID="hidID1" runat="server" />
      <asp:HiddenField ID="hidId"  runat="server" />
      <asp:HiddenField ID="hfStffId"  runat="server" />
    </form>
</body>
</html>
